home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hottest 6
/
Hottest 6 (1996)(PDSoft)[!].iso
/
software
/
videoutils
/
a-g
/
ami2d
/
rexx
/
ami2d.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1978-11-24
|
2KB
|
66 lines
/* Ami2d startup script for interactive use */
options results
if ~show('l', "rexxarplib.library") then do
check = addlib('rexxarplib.library',0,-30,0)
end
call pragma('stack',50000)
address command
'assign ami2d: /ami2d'
/* For WShell (cnc: device) uncomment the next line
and the line near the bottom */
/* 'dhopts menu ami2d:rexx/ami2d-menus name ami2d' */
if ~show('ports', "AMI2D") then do
'run ami2d:bin/ami2d ami2d:rexx/init'
do while ~show('ports', "AMI2D")
end
end
address ami2d 'open(-52,-50)'
call 'ami2d:rexx/rexxbar'
call 'ami2d:rexx/rexxcon'
do forever
address rxc_ami2d 'read'
comm = result
if comm = 'stop' then leave
if index(comm,'!cd') = 1 then do
if length(pragma('directory',substr(comm,5))) = 0 then iterate
end
n = index(comm,"!")
if n = 1 then do
if length(comm) = 1 then do
comm = GetFile(,,,,"select macro","AMI2D","PATGAD",,,,"#?.rexx")
if length(comm) = 0 then iterate
comm '>pipe:ami2d'
end
else substr(comm,2) '>pipe:ami2d'
call open('ami2d','pipe:ami2d','R')
do while ~eof('ami2d')
line = readln('ami2d')
if length(line) ~= 0 then address rxc_ami2d 'write("'line'")'
end
call close('ami2d')
end
else do
address ami2d comm
if rc > 0 then address ami2d 'why'
if length(result) > 0 then address rxc_ami2d 'write("'result'")'
end
end
call postmsg
address rxb_ami2d 'stop'
address rxc_ami2d 'stop'
if show('ports', "NLN2D") then address nln2d 'stop'
address ami2d 'stop'
/* For WShell (cnc: device) uncomment the next line */
/* 'dhopts delete ami2d' */
exit